/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.matapelajaran;

import com.ivanbiz.generic.GenericDAOImpl;
import org.hibernate.Query;

/**
 *
 * @author User
 */
public class MataPelajaranDAOImpl extends GenericDAOImpl implements MataPelajaranDAO {

    public boolean cekIsEmptyKode(String kode) throws Exception {
        Query query = getSessionFactory().getCurrentSession().createQuery("from MataPelajaran m where m.kode=:kode");
        query.setString("kode", kode);
        if (query.uniqueResult() != null) {
            return true;
        } else {
            return false;
        }
    }
}
